import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

//modified
public class CollectionsTest {
	public static void main(String[] args) {
		List<ComparatorTest> l = new ArrayList<>();
		ComparatorTest ct = new ComparatorTest();
		ct.setS1("a");
		ct.setS2("abc"
				+ "");
		ComparatorTest ct2 = new ComparatorTest();
		ct2.setS1("c");
		ct2.setS2("d");
		ComparatorTest ct3 = new ComparatorTest();
		ct3.setS1("a");
		ct3.setS2("b");
	
		l.add(ct);
		l.add(ct2);
		l.add(ct3);
		//Collections.sort(l);
		Collections.sort(l,ct);
		System.out.println(l);
	}
}
